# encoding: utf-8
"""
@author:auto generate code
@license: Apache Licence
@file: join_room_builder.py
@time: 2020-07-18 20:00:53
@contact: tongdangdang1@yy.com
"""
from sdktest_module.utils.api_base_builder import ApiBaseBuilder, parameter
from sdktest_module.utils.constant import *


def send_command(cmd):
    pass

def JoinRoomApiBuilder(platform):
    if platform == ANDROID:
        return JoinRoomApiBuilder_android()
    if platform == IOS:
        return JoinRoomApiBuilder_ios()


class JoinRoomApiBuilder_android(ApiBaseBuilder):
    api_name = "joinRoom"

    @parameter(1, "byte[]")
    def token(self, token):
        return self

    @parameter(2, "String")
    def roomName(self, roomName):
        return self

    @parameter(3, "String")
    def uid(self, uid):
        return self


class JoinRoomApiBuilder_ios(ApiBaseBuilder):
    api_name = "ThunderEngine.joinRoom:roomName:uid:"

    @parameter(1, "NSString")
    def token(self, token):
        return self

    @parameter(2, "NSString")
    def roomName(self, roomName):
        return self

    @parameter(3, "NSString")
    def uid(self, uid):
        return self


def joinRoom(token, roomName, uid):
    api_cmd = JoinRoomApiBuilder().token(token).roomName(roomName).uid(uid).build()
    send_command(api_cmd)


if __name__ == '__main__':
    JoinRoomApiBuilder().build()
